package com.winning.sjzc.common.service.impl;

import com.winning.sjzc.common.entity.po.SysYyzcEntity;
import com.winning.sjzc.common.service.CommonApiService;
import com.winning.sjzc.common.service.SysYyzcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * description:
 *
 * @author yanxf@winning.com.cn
 * @date 2019/08/13 14:39
 */
@Service
public class CommonApiServiceImpl implements CommonApiService {

  @Autowired
  private SysYyzcService sysYyzcService;

  @Override
  public byte[] getFile(String colName) {
    SysYyzcEntity sysYyzc = sysYyzcService.getSysYyzc();
    if("DLBJ".equals(colName)){
      return sysYyzc.getDlbj();
    }else if("DLTP".equals(colName)){
      return sysYyzc.getDltp();
    }else if("YYLOGO".equals(colName)){
      return sysYyzc.getYylogo();
    }
    return new byte[0];
  }
}
